﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Zwms.Data.BusinessObjects;
using Zwms.Data.CommonObject;

namespace Zwms.Server
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IServiceZwms”。
    [ServiceContract]
    public interface IServiceZwms
    {
        #region Department
        [OperationContract]
        SysDepartment QueryDepartment(SysDepartment record);

        [OperationContract]
        IList<SysDepartment> QueryDepartmentList(SysDepartment record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddDepartment(SysDepartment record);

        [OperationContract]
        bool UpdateDepartment(SysDepartment record);

        [OperationContract]
        bool DeleteDepartment(SysDepartment record);
        #endregion

        #region Dict
        [OperationContract]
        SysDict QueryDict(SysDict record);

        [OperationContract]
        IList<SysDict> QueryDictList(SysDict record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddDict(SysDict record);

        [OperationContract]
        bool UpdateDict(SysDict record);

        [OperationContract]
        bool DeleteDict(SysDict record);
        #endregion

        #region LogInf
        [OperationContract]
        SysLoginInf QueryLogInf(SysLoginInf record);

        [OperationContract]
        IList<SysLoginInf> QueryLogInfList(SysLoginInf record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddLogInf(SysLoginInf record);

        [OperationContract]
        bool UpdateLogInf(SysLoginInf record);

        [OperationContract]
        bool DeleteLogInf(SysLoginInf record);
        #endregion

        #region OptLog
        [OperationContract]
        SysOptLog QueryOptLog(SysOptLog record);

        [OperationContract]
        IList<SysOptLog> QueryOptLogList(SysOptLog record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddOptLog(SysOptLog record);

        [OperationContract]
        bool UpdateOptLog(SysOptLog record);

        [OperationContract]
        bool DeleteOptLog(SysOptLog record);


        #endregion

        #region LogNoGen
        [OperationContract]
        String GetCurrentLogNo(string logKind);
        #endregion

        #region SysRole
        [OperationContract]
        SysRole QuerySysRole(SysRole record);

        [OperationContract]
        IList<SysRole> QuerySysRoleList(SysRole record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateSysRole(SysRole record);

        [OperationContract]
        bool AddSysRole(SysRole record);

        [OperationContract]
        bool DeleteSysRole(SysRole record);

        #endregion

        #region SysAccount
        [OperationContract]
        SysAccount QuerySysAccount(SysAccount record);

        [OperationContract]
        IList<SysAccount> QuerySysAccountList(SysAccount record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateSysAccount(SysAccount record);

        [OperationContract]
        bool AddSysAccount(SysAccount record);

        [OperationContract]
        bool DeleteSysAccount(SysAccount record);
        #endregion

        #region SysAccount
        [OperationContract]
        SysConfig GetSysConfig();

        [OperationContract]
        bool UpdateSysConfig(SysConfig record);
        #endregion

        #region GoodsCategory
        [OperationContract]
        BaseGoodsCategory QueryGoodsCategory(BaseGoodsCategory record);

        [OperationContract]
        IList<BaseGoodsCategory> QueryGoodsCategoryList(BaseGoodsCategory record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddGoodsCategory(BaseGoodsCategory record);

        [OperationContract]
        bool UpdateGoodsCategory(BaseGoodsCategory record);

        [OperationContract]
        bool DeleteGoodsCategory(BaseGoodsCategory record);
        #endregion

        #region Goods
        [OperationContract]
        BaseGood QueryGoods(BaseGood record);

        [OperationContract]
        IList<BaseGood> QueryGoodsList(BaseGood record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddGoods(BaseGood record);

        [OperationContract]
        bool AddGoodsList(List<BaseGood> recordList);

        [OperationContract]
        bool UpdateGoods(BaseGood record);

        [OperationContract]
        bool DeleteGoods(BaseGood record);
        #endregion

        #region Company
        [OperationContract]
        BaseCompany QueryCompany(BaseCompany record);

        [OperationContract]
        IList<BaseCompany> QueryCompanyList(BaseCompany record, ref  PagerIndex pagerIndex);

        [OperationContract]
        IList<BaseCompany> QueryCompanyListNoPage(BaseCompany record);

        [OperationContract]
        bool AddCompany(BaseCompany record);

        [OperationContract]
        bool UpdateCompany(BaseCompany record);

        [OperationContract]
        bool DeleteCompany(BaseCompany record);
        #endregion

        #region Unit
        [OperationContract]
        BaseUnit QueryUnit(BaseUnit record);

        [OperationContract]
        IList<BaseUnit> QueryUnitList(BaseUnit record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddUnit(BaseUnit record);

        [OperationContract]
        bool UpdateUnit(BaseUnit record);

        [OperationContract]
        bool DeleteUnit(BaseUnit record);
        #endregion

        #region Region
        [OperationContract]
        BaseRegion QueryRegion(BaseRegion record);

        [OperationContract]
        IList<BaseRegion> QueryRegionList(BaseRegion record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddRegion(BaseRegion record);

        [OperationContract]
        bool UpdateRegion(BaseRegion record);

        [OperationContract]
        bool DeleteRegion(BaseRegion record);
        #endregion

        #region WhArea
        [OperationContract]
        WhArea QueryArea(WhArea record);

        [OperationContract]
        IList<WhArea> QueryAreaList(WhArea record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddArea(WhArea record);

        [OperationContract]
        bool UpdateArea(WhArea record);

        [OperationContract]
        bool DeleteArea(WhArea record);
        #endregion

        #region WhLocation
        [OperationContract]
        WhLocation QueryLocation(WhLocation record);

        [OperationContract]
        IList<WhLocation> QueryLocationList(WhLocation record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddLocation(WhLocation record);

        [OperationContract]
        bool UpdateLocation(WhLocation record);

        [OperationContract]
        bool DeleteLocation(WhLocation record);
        #endregion

        #region WhShelf
        [OperationContract]
        WhShelf QueryShelf(WhShelf record);

        [OperationContract]
        IList<WhShelf> QueryShelfList(WhShelf record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddShelf(WhShelf record);

        [OperationContract]
        bool UpdateShelf(WhShelf record);

        [OperationContract]
        bool DeleteShelf(WhShelf record);
        #endregion

        #region WhWarehouse
        [OperationContract]
        WhWarehouse QueryWarehouse(WhWarehouse record);

        [OperationContract]
        IList<WhWarehouse> QueryWarehouseList(WhWarehouse record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool AddWarehouse(WhWarehouse record);

        [OperationContract]
        bool UpdateWarehouse(WhWarehouse record);

        [OperationContract]
        bool DeleteWarehouse(WhWarehouse record);
        #endregion

        #region InPlanBill
        [OperationContract]
        string InitInPlanBillCode();

        [OperationContract]
        BilInPlanBill QueryInPlanBill(BilInPlanBill ipBill);

        [OperationContract]
        IList<BilInPlanBill> QueryInPlanBillList(BilInPlanBill ipBill, ref PagerIndex pageIndex);

        [OperationContract]
        bool UpdateInPlanBill(BilInPlanBill record);
        [OperationContract]
        bool AddInPlanBill(BilInPlanBill record);
        [OperationContract]
        bool DeleteInPlanBill(BilInPlanBill record);
        #endregion

        #region InPlanBillDetail
        [OperationContract]
        BilInPlanBillDetail QueryInPlanBillDetail(BilInPlanBillDetail ipBillDetail);

        [OperationContract]
        IList<BilInPlanBillDetail> QueryInPlanBillDetailList(BilInPlanBillDetail ipBillDetail, ref PagerIndex pageIndex);

        [OperationContract]
        bool UpdateInPlanBillDetail(BilInPlanBillDetail record);
        [OperationContract]
        bool AddInPlanBillDetail(BilInPlanBillDetail record);

        [OperationContract]
        bool AddInPlanBillDetailList(List<BilInPlanBillDetail> recordList);

        [OperationContract]
        bool DeleteInPlanBillDetail(BilInPlanBillDetail record);
        #endregion

        #region InBill
        [OperationContract]
        string InitInBillCode();
        [OperationContract]
        BilInBill QueryInBill(BilInBill inBill);

        [OperationContract]
        IList<BilInBill> QueryInBillList(BilInBill inBill, ref PagerIndex pageIndex);

        [OperationContract]
        bool UpdateInBill(BilInBill record);
        [OperationContract]
        bool AddInBill(BilInBill record);
        [OperationContract]
        bool DeleteInBill(BilInBill record);
        #endregion

        #region InBillDetail
        [OperationContract]
        BilInBillDetail QueryInBillDetail(BilInBillDetail inBillDetail);

        [OperationContract]
        IList<BilInBillDetail> QueryInBillDetailList(BilInBillDetail inBillDetail, ref PagerIndex pageIndex);

        [OperationContract]
        bool UpdateInBillDetail(BilInBillDetail record);
        [OperationContract]
        bool AddInBillDetail(BilInBillDetail record);
        
        [OperationContract]
        bool AddInBillDetailList(List<BilInBillDetail> recordList);

        [OperationContract]
        bool DeleteInBillDetail(BilInBillDetail record);
        #endregion

        #region StoGoodsStock

        [OperationContract]
        string InitGoodsStockCode();

        [OperationContract]
        StoGoodsStock QueryGoodsStock(StoGoodsStock record);

        [OperationContract]
        IList<StoGoodsStock> QueryGoodsStockList(StoGoodsStock record, ref PagerIndex pagerIndex);

        [OperationContract]
        IList<StoGoodsStock> QueryGoodsStockListOfAll(StoGoodsStock record);

        [OperationContract]
        bool UpdateGoodsStock(StoGoodsStock record);

        [OperationContract]
        bool AddGoodsStock(StoGoodsStock record);

        [OperationContract]
        bool AddGoodsStockList(List<StoGoodsStock> recordList);

        [OperationContract]
        bool DeleteGoodsStock(StoGoodsStock record);


        #endregion

        #region StatStockView

        [OperationContract]
        IList<StatStockView> QueryStatStockList(StatStockView record, ref PagerIndex pagerIndex);
        #endregion


        #region BillCountBill

        [OperationContract]
        string InitCountBillCode();

        [OperationContract]
        BilCountBill QueryCountBill(BilCountBill record);

        [OperationContract]
        IList<BilCountBill> QueryCountBillList(BilCountBill record, ref  PagerIndex pagerIndex);

        [OperationContract]
        IList<BilCountBill> QueryCountBillListEx(BilCountBill record, ref  PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateCountBill(BilCountBill record);

        [OperationContract]
        bool AddCountBill(BilCountBill record);

        [OperationContract]
        bool DeleteCountBill(BilCountBill record);
        #endregion

        #region BilCountBillDetail
        [OperationContract]
        BilCountBillDetail QueryCountBillDetail(BilCountBillDetail record);

        [OperationContract]
        IList<BilCountBillDetail> QueryCountBillDetailList(BilCountBillDetail record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateCountBillDetail(BilCountBillDetail record);

        [OperationContract]
        bool AddCountBillDetail(BilCountBillDetail record);

        [OperationContract]
        bool DeleteCountBillDetail(BilCountBillDetail record);
        #endregion

        #region BilTransferBill

        [OperationContract]
        string InitTsfBillCode();

        [OperationContract]
        BilTransferBill QueryTsfBill(BilTransferBill record);

        [OperationContract]
        IList<BilTransferBill> QueryTsfBillList(BilTransferBill record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateTsfBill(BilTransferBill record);

        [OperationContract]
        bool AddTsfBill(BilTransferBill record);

        [OperationContract]
        bool DeleteTsfBill(BilTransferBill record);

        #endregion

        #region BilTransferBillDetail
        [OperationContract]
        BilTransferBillDetail QueryTsfBillDtl(BilTransferBillDetail record);

        [OperationContract]
        IList<BilTransferBillDetail> QueryTsfBillDtlList(BilTransferBillDetail record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateTsfBillDtl(BilTransferBillDetail record);

        [OperationContract]
        bool AddTsfBillDtl(BilTransferBillDetail record);

        [OperationContract]
        bool DeleteTsfBillDtl(BilTransferBillDetail record);

        #endregion

        #region BilTsfStockLog
        [OperationContract]
        BilTsfStockLog QueryTsfStockLog(BilTsfStockLog record);

        [OperationContract]
        IList<BilTsfStockLog> QueryTsfStockLogList(BilTsfStockLog record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateTsfStockLog(BilTsfStockLog record);

        [OperationContract]
        bool AddTsfStockLog(BilTsfStockLog record);

        [OperationContract]
        bool DeleteTsfStockLog(BilTsfStockLog record);
        #endregion

        #region OutPlanBill
        [OperationContract]
        string InitOutPlanBillCode();

        [OperationContract]
        BilOutPlanBill QueryOutPlanBill(BilOutPlanBill record);

        [OperationContract]
        IList<BilOutPlanBill> QueryOutPlanBillList(BilOutPlanBill record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateOutPlanBill(BilOutPlanBill record);

        [OperationContract]
        bool AddOutPlanBill(BilOutPlanBill record);

        [OperationContract]
        bool DeleteOutPlanBill(BilOutPlanBill record);
        #endregion

        #region OutPlanBillDetail
        [OperationContract]
        BilOutPlanBillDetail QueryOutPlanBillDetail(BilOutPlanBillDetail record);

        [OperationContract]
        IList<BilOutPlanBillDetail> QueryOutPlanBillDetailList(BilOutPlanBillDetail record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateOutPlanBillDetail(BilOutPlanBillDetail record);

        [OperationContract]
        bool AddOutPlanBillDetail(BilOutPlanBillDetail record);

        [OperationContract]
        bool AddOutPlanBillDetailList(List<BilOutPlanBillDetail> recordList);

        [OperationContract]
        bool DeleteOutPlanBillDetail(BilOutPlanBillDetail record);

        #endregion

        #region OutBill
        [OperationContract]
        string InitOutBillCode();

        [OperationContract]
        BilOutBill QueryOutBill(BilOutBill inBill);
        [OperationContract]
        IList<BilOutBill> QueryOutBillList(BilOutBill inBill, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateOutBill(BilOutBill record);

        [OperationContract]
        bool AddOutBill(BilOutBill record);

        [OperationContract]
        bool DeleteOutBill(BilOutBill record);

        #endregion

        #region OutBillDetail

        [OperationContract]
        BilOutBillDetail QueryOutBillDetail(BilOutBillDetail record);

        [OperationContract]
        IList<BilOutBillDetail> QueryOutBillDetailList(BilOutBillDetail record, ref PagerIndex pagerIndex);

        [OperationContract]
        bool UpdateOutBillDetail(BilOutBillDetail record);

        [OperationContract]
        bool AddOutBillDetail(BilOutBillDetail record);

        [OperationContract]
        bool AddOutBillDetailList(List<BilOutBillDetail> recordList);

        [OperationContract]
        bool DeleteOutBillDetail(BilOutBillDetail record);


        #endregion

        #region System
        [OperationContract]
        DateTime GetCurrentSystemTime();

         [OperationContract]
        string GetAuthorityString();
        [OperationContract]
        bool UpdateAccount(SysAccount record);

        [OperationContract]
        SysAccount GetAccountByUserCode(string sUserCode);

        [OperationContract]
        IList<SysMenu> GetMenuByRoleCode(string sRoleCode);

        [OperationContract]
        bool AddMenuList(List<SysMenu> menuList);

        [OperationContract]
        bool DeleteMenuList(List<SysMenu> menuList);
        #endregion
    }
}
